package com.itheima.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.itheima.pojo.pageQuery;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * 用户认证对象 - certification_information
 *
 * @author guanhuaer
 * @date 2025-04-26
 */
@Data
public class CertificationInformation extends pageQuery {
    private static final long serialVersionUID = 1L;

    /** id */
    @ApiModelProperty("主键ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /** 用户姓名 */
    @ApiModelProperty("用户姓名")
    private String username;

    /** 工号 */
    @ApiModelProperty("工号")
    private String workNumber;

    /** 电话 */
    @ApiModelProperty("电话")
    private String mobile;

    /** 邮箱 */
    @ApiModelProperty("邮箱")
    private String email;

    /** 用户类型 */
    @ApiModelProperty("用户类型(0学生，1教师，2管理员)")
    private Integer userType;

    /** 创建时间 */
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDate;

    /** 更新时间 */
    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateDate;

    @Override
    public String toString() {
        return "CertificationInformation{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", workNumber='" + workNumber + '\'' +
                ", mobile='" + mobile + '\'' +
                ", email='" + email + '\'' +
                ", userType=" + userType +
                ", createDate=" + createDate +
                ", updateDate=" + updateDate +
                '}';
    }
}
